package com.clothing.entity;

import java.util.Date;

import javax.persistence.*;

/**
 * @ClassName: BlackList
 * @Description: TODO(黑名单)
 * @author Charles
 * @date 2018年7月11日 下午5:49:23
 * @version 1.0
 */
@Entity
@Table(name = "black_list")
public class BlackList extends BaseEntity
{
    private static final long serialVersionUID = -3846664617616580854L;

    /**
     * 黑名单状态
     */
    public enum Status
    {
        /* 警告 */
        warning,

        /* 严重 */
        severe
    }

    private User user;

    private Date invalidDate;

    private Status status;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user", nullable = false)
    public User getUser()
    {
        return user;
    }

    public void setUser(User user)
    {
        this.user = user;
    }

    @Column(name = "invalid_date", nullable = false)
    public Date getInvalidDate()
    {
        return invalidDate;
    }

    public void setInvalidDate(Date invalidDate)
    {
        this.invalidDate = invalidDate;
    }

    @Column(name = "status", nullable = false)
    public Status getStatus()
    {
        return status;
    }

    public void setStatus(Status status)
    {
        this.status = status;
    }
}
